package com.zshan.clinic.admin.constant;

import com.zshan.clinic.common.util.string.StringUtil;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@ConfigurationProperties(prefix = "oss")
public class OssProperties {

    /**
     * 地域节点
     */
    private String endPoint;
    private String accessKeyId;
    private String accessKeySecret;
    /**
     * OSS的Bucket名称
     */
    private String bucketName;
    /**
     * Bucket 域名
     */
    private String domain;
    /**
     * 目标文件夹
     */
    private String fileHost;

    public boolean isValid() {
        return !StringUtil.hasBlank(endPoint,accessKeyId,accessKeySecret,bucketName,domain,fileHost);
    }
}
